package test;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

/**
 * @Author wangtengyu
 * @Create 2018-06-05-9:39
 */
public class Compare {

    public static void main(String[] args) {

        List list=new ArrayList();
        list.add(1);
        list.add(2);
        list.sort(Comparator.comparing(Integer::intValue));
        for(Object i:list){
            System.out.println(i);
        }
    }
}
